package com.yangl.study.beans;

/**
 * @author yanglei
 * @date 2021-12-05 22:41
 */
public interface BeanPostProcessor {

    /**
     * 前置增强
     *
     * @param bean bean 实例
     * @param beanName bean 名称
     * @return bean 实例
     * @throws Exception 异常
     */
    Object postProcessBeforeInitialization(Object bean, String beanName) throws Exception;

    /**
     * 后置增强
     *
     * @param bean bean 实例
     * @param beanName bean 名称
     * @return bean 实例
     * @throws Exception 异常
     */
    Object postProcessAfterInitialization(Object bean, String beanName) throws Exception;
}
